package com.jch.helloworld.configBeans.annotation2.service;

import com.jch.helloworld.configBeans.annotation2.repository.DemoAnnotation2Repository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service // 服务层
public class DemoAnnotation2Service {

    @Autowired
    private DemoAnnotation2Repository repository;

    public void add(){
        System.out.println("DemoAnnotation2Service add...");
        repository.save();
        System.out.println(repository);
    }

}
